package fun.stgoder.test1;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.concurrent.TimeUnit;

public class TestSocket {


    public static void main(String[] args) throws IOException, InterruptedException {

        Socket socket = new Socket("localhost", 9000);
        OutputStream outputStream = socket.getOutputStream();

        //for (; ; ) {
            outputStream.write(new byte[]{0x54,
                    0x54,
                    0x01,
                    0x58,
                    0x52,
                    0x00,
                    0x16,
                    0x29,
                    0x20,
                    0x43,
                    0x39,
                    0x00,
                    0x03,
                    0x32,
                    0x30,
                    0x31,
                    0x35,
                    0x30,
                    0x33,
                    0x31,
                    0x39,
                    0x30,
                    0x32,
                    0x35,
                    0x31,
                    0x30,
                    0x36,
                    0x2C,
                    0x41,
                    0x2C,
                    0x35,
                    0x2C,
                    0x4E,
                    0x2C,
                    0x32,
                    0x32,
                    0x2E,
                    0x35,
                    0x33,
                    0x37,
                    0x33,
                    0x31,
                    0x30,
                    0x2C,
                    0x45,
                    0x2C,
                    0x31,
                    0x31,
                    0x34,
                    0x2E,
                    0x30,
                    0x32,
                    0x32,
                    0x38,
                    0x35,
                    0x30,
                    0x2C,
                    0x30,
                    0x2E,
                    0x31,
                    0x2C,
                    0x31,
                    0x2E,
                    0x34,
                    0x2C,
                    0x35,
                    0x33,
                    0x2E,
                    0x35,
                    0x3B,
                    0x34,
                    0x36,
                    0x30,
                    0x2C,
                    0x30,
                    0x2C,
                    0x31,
                    0x30,
                    0x31,
                    0x37,
                    0x33,
                    0x2C,
                    0x34,
                    0x36,
                    0x38,
                    0x30,
                    0x2C,
                    0x33,
                    0x35,
                    0x3B,
                    0x30,
                    0x30,
                    0x39,
                    0x30,
                    0x34,
                    0x43,
                    0x30,
                    0x37,
                    0x37,
                    0x31,
                    0x31,
                    0x32,
                    0x2C,
                    0x41,
                    0x43,
                    0x41,
                    0x32,
                    0x31,
                    0x33,
                    0x41,
                    0x46,
                    0x37,
                    0x38,
                    0x43,
                    0x30,
                    0x2C,
                    0x36,
                    0x33,
                    0x36,
                    0x38,
                    0x36,
                    0x35,
                    0x36,
                    0x45,
                    0x36,
                    0x37,
                    0x33,
                    0x42,
                    0x37,
                    0x34,
                    0x36,
                    0x35,
                    0x37,
                    0x33,
                    0x37,
                    0x34,
                    0x33,
                    0x42,
                    0x37,
                    0x37,
                    0x36,
                    0x39,
                    0x36,
                    0x36,
                    0x36,
                    0x39,
                    0x33,
                    0x42,
                    0x37,
                    0x33,
                    0x37,
                    0x33,
                    0x36,
                    0x39,
                    0x36,
                    0x34,
                    0x2C,
                    0x2D,
                    0x36,
                    0x31,
                    0x2C,
                    0x41,
                    0x43,
                    0x41,
                    0x32,
                    0x31,
                    0x33,
                    0x41,
                    0x46,
                    0x37,
                    0x38,
                    0x43,
                    0x38,
                    0x2C,
                    0x45,
                    0x35,
                    0x39,
                    0x46,
                    0x38,
                    0x45,
                    0x45,
                    0x35,
                    0x42,
                    0x38,
                    0x38,
                    0x32,
                    0x45,
                    0x36,
                    0x42,
                    0x43,
                    0x41,
                    0x42,
                    0x45,
                    0x36,
                    0x41,
                    0x44,
                    0x41,
                    0x35,
                    0x45,
                    0x35,
                    0x38,
                    0x35,
                    0x38,
                    0x44,
                    0x45,
                    0x38,
                    0x42,
                    0x34,
                    0x42,
                    0x39,
                    0x35,
                    0x37,
                    0x34,
                    0x39,
                    0x34,
                    0x36,
                    0x34,
                    0x39,
                    0x2C,
                    0x2D,
                    0x37,
                    0x31,
                    0x2C,
                    0x41,
                    0x45,
                    0x41,
                    0x32,
                    0x31,
                    0x33,
                    0x41,
                    0x45,
                    0x37,
                    0x38,
                    0x43,
                    0x38,
                    0x2C,
                    0x42,
                    0x33,
                    0x43,
                    0x37,
                    0x43,
                    0x41,
                    0x44,
                    0x30,
                    0x43,
                    0x32,
                    0x46,
                    0x45,
                    0x42,
                    0x32,
                    0x42,
                    0x44,
                    0x43,
                    0x33,
                    0x45,
                    0x32,
                    0x42,
                    0x37,
                    0x44,
                    0x31,
                    0x35,
                    0x37,
                    0x34,
                    0x39,
                    0x34,
                    0x36,
                    0x34,
                    0x39,
                    0x2C,
                    0x2D,
                    0x37,
                    0x32,
                    0x2C,
                    0x32,
                    0x38,
                    0x43,
                    0x46,
                    0x45,
                    0x39,
                    0x30,
                    0x45,
                    0x32,
                    0x32,
                    0x42,
                    0x31,
                    0x2C,
                    0x34,
                    0x33,
                    0x36,
                    0x46,
                    0x36,
                    0x44,
                    0x37,
                    0x39,
                    0x36,
                    0x45,
                    0x2C,
                    0x2D,
                    0x37,
                    0x38,
                    0x2C,
                    0x32,
                    0x30,
                    0x44,
                    0x43,
                    0x45,
                    0x36,
                    0x46,
                    0x45,
                    0x45,
                    0x36,
                    0x37,
                    0x37,
                    0x2C,
                    0x36,
                    0x33,
                    0x36,
                    0x39,
                    0x37,
                    0x34,
                    0x37,
                    0x39,
                    0x36,
                    0x44,
                    0x36,
                    0x31,
                    0x36,
                    0x45,
                    0x36,
                    0x32,
                    0x37,
                    0x35,
                    0x2C,
                    0x2D,
                    0x38,
                    0x37,
                    0x00,
                    0x00,
                    0x00,
                    0x03,
                    0x67,
                    0x3F,
                    0x0D,
                    0x0A});
            outputStream.flush();

            TimeUnit.SECONDS.sleep(1);
        //}


    }
}
